//
//  IGUpProductionApi.m
//  jingdongfang
//
//  Created by MTiMac01 on 2017/9/15.
//  Copyright © 2017年 LJL. All rights reserved.
//

#import "IGUpProductionApi.h"

@implementation IGUpProductionApi

- (NSString *)requestUrl
{
    if (_isOpen)
    {
        return @"works/works!publicWorksUpload.action";
    }
    return @"works/works!privateWorksUpload.action";
}

- (id)requestArgument
{
    if (_isOpen)
    {
        NSError *parseError = nil;
        NSDictionary *dic = @{
                              @"id":_pId?:@"",
                              @"uId":[IGUser getUid]?:@"",
                              @"title": _title?:@"",
                              @"content": _content?:@"",
                              @"classType": _classType?:@"",
                              @"plates":_plates?:@"",
                              @"years":_years?:@"",
                              @"kuan":_kuan?:@"",
                              @"gao":_gao?:@"",
                              @"collection":_collection?:@"",
                              @"theme":_theme?:@"",
                              @"labels":_labels?:@"",
                              @"collPrice":_collPrice?:@"",
                              @"collNums":_collNums?:@"",
                              @"image":_image?:@"",
                              @"athena":_athena?:@"",
                              @"cropUrl":_cropUrl?:@"",
                              @"width":_width?:@"",
                              @"height":_height?:@""
                              };
        NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dic options:0 error:&parseError];

        return @{@"works" : [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]};
    }
    return @{
             @"uId":[IGUser getUid]?:@"",
             @"title": _title?:@"",
             @"content": _content?:@"",
             @"plates":_plates?:@"",
             @"image":_image?:@"",
             @"cropUrl":_cropUrl?:@"",
             @"width":_width?:@"",
             @"height":_height?:@""
             };
}
@end

@implementation IGUpProductionModel

@end

@implementation IGUpProductionResp

@end

